/**
模拟手机打开浏览器
 */

const devices = require('puppeteer/DeviceDescriptors')  //引入手机设备ua 设置
const puppeteer = require('puppeteer');
(async () => {
    const browser = await puppeteer.launch({headless: false})
    const page = await browser.newPage()
    await page.emulate(devices['iPhone X'])
    await page.goto('http://www.baidu.com')
    // await page.screenshot({path: 'c:/temp/baidu_iphone_X.png'})
})()